package com.quarters.serviceImpl;

import com.quarters.bean.Menu;
import com.quarters.bean.Role;
import com.quarters.bean.ztree.ZtreeBean;
import com.quarters.mapper.MenuMapper;
import com.quarters.service.MenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 冯政尚
 * @since 2019-09-02
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {

    @Override
    public List<Menu> findMenuByRole(Role role) {
        System.out.println("Role:"+role);
        return baseMapper.findMenuByRole(role);
    }


    @Override
    public List<ZtreeBean> findMenuZtree(Long id) {
        return baseMapper.findMenuZtree(id);    }


    @Override
    public List<ZtreeBean> findMenu( ) {
        return baseMapper.findMenu();    }


}
